<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <%@ include file="/static/admin/jsp/include.jsp"%>
    <script type="text/javascript">
        var id = "${id}";


        $(function() {

            if (id != '') {
                parent.$.messager.progress({
                    text : '数据加载中....'
                });
                $.post(sy.contextPath + '/goodsRecodLog/selectList', {
                    goodsId : id
                }, function(result) {
                    if (result) {
                        $('form').form('load', result);
                        var html = "";
                        for(var i = 0; i< result.length; i++){
                            console.log(result)
                            html+='<tr>';
                            if(result[i].bindPhone != null){
                                html+='    <th style="width:100px;">手机号：</th>';
                                html+='    <td>' + result[i].bindPhone+ '</td>';
                            }else{
                                html+='    <th style="width:100px;">第三方登录账号：</th>';
                                html+='    <td>' + result[i].account+ '</td>';
                            }
                            html+='    <th style="width:100px;">交易价格：</th>';
                            html+='    <td>' + result[i].orderPrice+ '</td>';
                            html+='    <th style="width:100px;">时间：</th>';
                            html+='    <td>' + result[i].createTime.substr(0,10)+ '</td>';
                            html+='</tr>';

                        }
                        $("#record").append(html);
                    }
                    parent.$.messager.progress('close');
                }, 'json');
            }
        });
    </script>
</head>
<body>
<form id="form" method="post">
    <input name="id" type="hidden" />
    <div style="padding:15px;font-size: 12px">
        <table style="table-layout:fixed;" border="0" cellspacing="0" class="formtable" id="record">
        </table>
    </div>
</form>
</body>
</html>